<template>
  <div>
    <i-switch v-model="curData" v-if="data === true || data === false">
      <Icon type="md-checkmark" slot="open"></Icon>
      <Icon type="md-close" slot="close"></Icon>
    </i-switch>
    <span v-else>数据不匹配该显示类型</span>
  </div>
</template>
<script>
export default {
  name: 'dtTag',
  props: ['data'],
  data () {
    return {
      curData: false
    }
  },
  mounted () {
    if (this.data) {
      this.curData = true
    }
  }
}
</script>
